home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / compulse.swf / scripts / DefineSprite_330 / frame_1 / DoAction.as
Encoding:
Text File  |  2013-04-24  |  960 b   |  37 lines

  1. letter = _name.substr(0,1);
  2. number = _name.substr(1,3000);
  3. activeTimeOut = false;
  4. onEnterFrame = function()
  5. {
  6.    if(activeTimeOut == true)
  7.    {
  8.       if(!_root.ball.hitTest(this))
  9.       {
  10.          activeTimeOut = false;
  11.       }
  12.       tele.gotoAndStop(2);
  13.    }
  14.    else
  15.    {
  16.       tele.gotoAndStop(1);
  17.       if(this.hitTest(_root.ball))
  18.       {
  19.          var _loc3_ = new Sound(this);
  20.          _loc3_.attachSound("PIPE");
  21.          _loc3_.start(0,1);
  22.          if(letter == "a")
  23.          {
  24.             _root.levels["b" + number].activeTimeOut = true;
  25.             _root.ball._x = _root.levels["b" + number]._x;
  26.             _root.ball._y = _root.levels["b" + number]._y;
  27.          }
  28.          else if(letter == "b")
  29.          {
  30.             _root.levels["a" + number].activeTimeOut = true;
  31.             _root.ball._x = _root.levels["a" + number]._x;
  32.             _root.ball._y = _root.levels["a" + number]._y;
  33.          }
  34.       }
  35.    }
  36. };
  37.